package cn.tedu.tmall.passport.dao.persist.repository.impl;

import cn.tedu.tmall.passport.dao.persist.mapper.StaffMapper;
import cn.tedu.tmall.passport.dao.persist.mapper.UserMapper;
import cn.tedu.tmall.passport.dao.persist.repository.IStaffRepository;
import cn.tedu.tmall.passport.dao.persist.repository.IUserRepository;
import cn.tedu.tmall.passport.pojo.entity.Staff;
import cn.tedu.tmall.passport.pojo.entity.User;
import cn.tedu.tmall.passport.pojo.vo.StaffLoginInfoVO;
import cn.tedu.tmall.passport.pojo.vo.UserLoginInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class StaffRepositoryImpl implements IStaffRepository {

    @Autowired
    private StaffMapper staffMapper;

    //用户注册
    @Override
    public int staffReg(Staff staff) {
        return staffMapper.insert(staff);
    }

    @Override
    public StaffLoginInfoVO getLoginInfoByUsername(String username) {
        return staffMapper.getLoginInfoByUsername(username);
    }
    /*@Override
    public UserLoginInfoVO getLoginInfoByPhone(String phone) {
        return userMapper.getLoginInfoByPhone(phone);
    }*/


}
